<template>
    <div class="app">
        <div class="left">
            <div v-for='(item,index) in list' :key='index' class="title" :class="first_id==item.id?'activate':''" @click="set_first_id(item.id)">
                {{item.name}}
            </div>
        </div>
        <div class="right">
            <router-link v-for='(subitem,index) in sublist' :key='index' class="sub_cate"
                         :to="'/pages/goods/list?id='+subitem.id">
                <div class="pic"><img :src="resurl+subitem.pic" alt=""></div>
                <div class="name">{{subitem.name}}</div>
            </router-link>
        </div>
        <main_menu index="1" :group_code="user.group_code"></main_menu>
    </div>
</template>

<script src="./main.js"></script>

<style lang="less" src="./main.less" scoped></style>
